Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ruff format & lint (isort only) #560

Merged
merged 1 commit into from
Jul 3, 2024
Merged

Add ruff format & lint (isort only) #560

merged 1 commit into from
Jul 3, 2024

Conversation

Mogost
Copy link
Member

@Mogost Mogost commented Jul 3, 2024

  1. Applied formatting
  2. Configured ruff linter but enabled only isort rules to reduce changes (more linters will be enabled separately)
  3. Added linters in ci

All code changes were made by ruff automatically and marked by it as safe

@Mogost Mogost self-assigned this Jul 3, 2024
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 90.43%. Comparing base (ef24fcb) to head (a0ad2ea).
Report is 15 commits behind head on master.

Files Patch % Lines
constance/forms.py 78.57% 3 Missing ⚠️
constance/backends/redisd.py 88.88% 1 Missing ⚠️
constance/management/commands/constance.py 91.66% 1 Missing ⚠️
constance/models.py 50.00% 1 Missing ⚠️
constance/test/unittest.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #560      +/-   ##
==========================================
+ Coverage   89.92%   90.43%   +0.50%     
==========================================
  Files          31       31              
  Lines        1032     1087      +55     
  Branches      104      158      +54     
==========================================
+ Hits          928      983      +55     
  Misses         69       69              
  Partials       35       35              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
Comment on lines 34 to +38
raise ImproperlyConfigured(
"The CONSTANCE_DATABASE_CACHE_BACKEND setting refers to a "
'The CONSTANCE_DATABASE_CACHE_BACKEND setting refers to a '
"subclass of Django's local-memory backend (%r). Please "
"set it to a backend that supports cross-process caching."
% settings.DATABASE_CACHE_BACKEND)
'set it to a backend that supports cross-process caching.' % settings.DATABASE_CACHE_BACKEND
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we take the opportunity to migrate this to a f-string?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should. There are linters for that in ruff. But to reduce complexity of reviewing process I've moved this out of scope of this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the start of a great refresh 🙏

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. than go next 😄

@Mogost Mogost merged commit 57083bb into jazzband:master Jul 3, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants